package com.ctgu.fcftsystem.dao;

import com.ctgu.fcftsystem.pojo.Sharesholder;
import com.ctgu.fcftsystem.pojo.Spend;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SharesholderDao {

    /*分页查询*/
    List<Sharesholder> findByPaging(int pageCount, int pageSize);

    /**
     * 添加持股记录
     * @param sharesholder
     * @return
     */
    int addSharesholderDao(@Param("sharesholder") Sharesholder sharesholder);

    /**
     * 根据股票名称、holder和证券用户等多重条件查询持股信息
     * @param sharesName
     * @param holder
     * @param securitiesId
     * @return
     */
    List<Sharesholder> searchSharesholder(@Param("sharesName") String sharesName, @Param("holder") String holder, @Param("securitiesId") Integer securitiesId);

    /**
     * 根据id删除持股信息
     * @param id
     * @return
     */
    int deleteSharesholderById(@Param("id") Integer id);

    /**
     * 根据id维护持股信息
     * @return
     */
    int updateSharesholderById(@Param("shd") Sharesholder  sharesholder);
}
